package fr.notoriousmaster.fury.lib.file;

import java.io.File;

import android.os.Environment;

public class LibFile {
	
	private String mAppName;
	private String mAppDirectory;
	
	public LibFile(String appName) {
		mAppName=appName;
		
		File sdcard = Environment.getExternalStorageDirectory();
		File dir = new File(sdcard.getAbsolutePath()
							+"/"+mAppName);
		if (!dir.exists())
			dir.mkdirs();		
		
		mAppDirectory=dir.getAbsolutePath()+"/";
		dir.listFiles();
		
	}
	
	public boolean fileExist(String subPath) {
		File dir = new File(mAppDirectory+subPath);		
		return dir.exists();
	}
	
	public void finalize() {
		
	}
	
	public String getAppDirectory() {
		return mAppDirectory;
	}
	
}
